#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;

int main() {
	string a, b;
	int ans[1000];
	int len = 0;
	cin >> a >> b;
	int i, j;
	i = a.length() - 1;
	j = b.length() - 1;
	bool flag = false;
	while (i >= 0 || j >= 0) {
		int temp;
		if (i >= 0 && j >= 0) {
			temp = a[i--] - '0' + b[j--] - '0' + flag;
			flag = temp / 10;
			temp = temp % 10;
		} else if (i >= 0) {
			temp = a[i--] - '0' + flag;
			flag = temp / 10;
			temp = temp % 10;
		} else if (j >= 0) {
			temp = b[j--] - '0' + flag;
			flag = temp / 10;
			temp = temp % 10;
		}
		ans[len++] = temp;
	}
	if (flag)
		ans[len++] = flag;
	for (int i = len - 1; i >= 0; i--) {
		cout << ans[i];
	}
}